package day2;


import java.text.DecimalFormat;
import java.util.Scanner;

public class demo3 {
    public static void main(String[] args) {
        char t='袈';
        char j='杀';
        String kk="read";
        System.out.println(t+kk+j);
        Scanner sc = new Scanner(System.in);
        System.out.println("请输入java的成绩");
        double a = sc.nextDouble();
        System.out.println("请输入mysql的成绩");
        double b = sc.nextDouble();
        System.out.println("请输入vue的成绩");
        double c = sc.nextDouble();
        System.out.println("平均分"+(a+b+c)/3);
        System.out.println("总分"+(a+b+c));
        DecimalFormat df = new DecimalFormat("#.#");
        String avg = df.format(c);
        System.out.println(avg);

        System.out.println("请输入购物金额");
        double d = sc.nextDouble();
        System.out.println("请输入客户积分");
        double e = sc.nextDouble();
        if(d<=2000){
            System.out.println("实付金额:"+d*0.9);
        }
        if(4000>=d&&d>2000){
            System.out.println("实付金额:"+d*0.8);
        }
        if(d>=8000){
            System.out.println("实付金额:"+d*0.7);
        }


        System.out.println("请输入月份");
        double f = sc.nextDouble();
        System.out.println("请输入年龄");
        double g = sc.nextDouble();
        if(10>=f&&f>=4) {
            if (d <= 18) {
                System.out.println("实付金额:" + d / 2);
            }
            if (60 >= d && d > 18) {
                System.out.println("实付金额:" + 60);
            }
            if (d > 60) {
                System.out.println("实付金额:" + d / 3);
            }
        }
        else {
            if (60 >= d && d > 18) {
                System.out.println("实付金额:" + 60);
            }
            else{
                System.out.println("实付金额:"+20);
            }
        }



    }
}
